Recent developments in the technology associated with data processor-controlled interactive display terminals have provided the operator with the capability of displaying the contents of several documents or records on a display terminal screen at the same time. The contents are typically displayed in a plurality of often overlapping windows, wherein each window displays the contents of a particular document or computer file. U.S. Pat. Nos. 4,586,035 and 4,714,918 are illustrative of the manner in which such overlapping windows are used in computer systems.
In a typical windowing system such as X-Windows.sup.1, as described in X-Windows User Guide and Reference for the IBM RT-PC, 1987, a single physical screen is used to display several windows in a "space-multiplexed" fashion. In the newer of such computer systems, several applications can be simultaneously run on the computer. Each application being run on the computer typically "owns" one or more windows on the display screen. Normally, the applications are independent of one another, and, accordingly, the contents of one screen are independent of the contents of the other screens. The windows may be of different sizes and may partially or completely overlap. FNT 1X-Windows is a trademark of IBM Corporation.
The windows are typically under the control of a software-based display manager system which views the windows as a stack so that there is a total ordering of the windows with respect to depth. For example, at any given time, one window is on top, one is on the bottom and the other windows are ordered somewhere in between. Since a window normally does not occupy the entire display area of a display screen and/or may be partly or totally obscured by other windows, applications running on multi-tasking computer systems having windowing capabilities normally are not allowed to write directly to the display adapter in order to generate displays associated with such applications.
Typically, the applications in such a computer system must request a window manager to transmit data to the display screen on its behalf. The software-based window manager insures that the output for an application is written only to the window(s) owned by that application by "clipping" the output request and discarding those portions of the graphic or text output from that application which would lie outside the window or portion thereof formed on the screen for an application. This clipping is normally done by a software-based utility program, and it can be very time-consuming.
Recently, there have been significant advancements in the field of interactive computer graphics to speed up the processing of data necessary to generate the complex computer-generated pictures representative of the present state-of-the-art. Such techniques are described, for example, by J.D. Foley and A. Van Dan in Fundamentals of Interactive Computer Graphics, Addison-Wesley, 1982. One of the techniques commonly used in the field of three-dimensional interactive computer graphics is a "Z-buffer". Particularly, a Z-buffer is a simple hardware device used to eliminate hidden lines and hidden surfaces when showing a computer-generated picture on a raster-scan display.
In the past, interactive computer graphic systems would normally used special-purpose computers to generate models of three dimensional objects typically consisting of many polygons. Each polygon had its own location and orientation in three dimensional space, as well as its own color and intensity information.
The display of a three-dimensional object by a computer system typically requires computing a color/intensity value for each pixel. For a given orientation of the object being viewed on a screen, a pixel on the display screen may potentially come from more than one polygon in the object. The pixel value that is displayed on such systems is from the polygon which is "in front of" any other polygons in the line of sight from the viewer through the pixel in question.
When a picture of a three dimensional object is displayed in such computer graphic systems, the polygons making up the object are processed in some order. This order may be the natural order in which the polygons are encountered; which depends on the way the data structure defining the object is constructed, or it may be sorted in some way to make the output process simpler. For example, the polygons may be sorted by depth (z-value) so that those polygons which are further from the observer are encountered first. This sorting is typically done in computer graphic systems so that any particular scene may be displayed on a screen by processing the polygons in a sorted order and, for each polygon, inserting the proper values in the pixels covered by that polygon. A pixel may be written to several times, depending on how many polygons in any given three dimensional object overlap the point on the screen defined by the pixel. Since the polygons are sorted by depth, the last value written to any pixel will be the value for that pixel's closest polygon. In other words, those polygons which are nearest the observer will obscure polygons further back.
It has been found that sorting polygons by depth is usually not desirable because of the lengthy processing time involved and because the sorting was not fool-proof. For example, polygons which intersect one another or which overlap one another in complicated ways in three dimensional space cannot necessarily be sorted based upon one z-value; rather, sorting actually needs to be done for each pixel if the sorting is to be completely accurate. If the object is rotated, is moved with respect to the background, or is moved with respect to other objects in the screen, or if the viewpoint of the observer changes, then the sort must be done again.
It has been found that in such three-dimensional computer graphics applications, the use of a Z-buffer avoids the need for any type of sort by saving the depth information (z-value) for each pixel along with the color/intensity value. See Foley and Van Dan at pp. 560-561. The use of a Z-buffer, thus, allows polygons making up a scene to be processed in any order because depth information is tracked per pixel rather than per polygon. Accordingly, strange overlappings of polygons and intersecting polygons will not have an adverse effect on generating the computer image.
The disadvantages associated with the time-consuming software clipping used in updating windows in computer systems having a shared display surface is overcome by the present invention by the addition of a hardware-based depth buffer for windows in the conventional display adapter. The present invention also reduces the time needed to update or rearrange the windows by allowing a particular application to be given direct access to the display adapter of the computer system, while insuring the integrity of the subject matter on windows belonging to other applications being run on the computer system.